package com.mx.zb.md.tenant.control;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.mx.zb.md.tenant.bo.Person;
import com.mx.zb.md.tenant.utils.ex.RestAnnotation;

@RestController
@RestAnnotation
public class RestDemoCtrl {
	
	@RequestMapping("/hello")
    public String hello(@RequestBody Person user) {
		if(user!=null) {
			return "Hello "+user.getName()+", age:"+user.getAge();
		}else {
			return "Hello, no user info.";
		}       
    }

}
